package cn.virens.web.controller.portal;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.virens.exception.APIException;
import cn.virens.web.common.BaseController;

@RequestMapping("/portal")
@Controller("PortalIndexContorller")
public class IndexContorller extends BaseController {
	public IndexContorller() {
		super("portal");
	}

	@RequestMapping("index.jspx")
	public String index(Model model) {
		model.addAttribute("test", "test");

		return returnUrl("index");
	}

	@ResponseBody
	@RequestMapping("ex.json")
	public void ex(Model model) {
		throw new APIException("TEST", "测试移除");
	}

}
